function greetings() {

var today = new Date ()
var hrs = today.getHours();
if (hrs >= 5 && hrs <= 10)
        document.write("Good Morning");
else if (hrs >= 10 && hrs <= 16)
        document.write("Good Day");
else if (hrs >= 16 && hrs <= 18)
		document.write("Good Afternoon");
else if (hrs >= 18 && hrs <= 20)
     document.write("Good Evening");
else
	document.write("Good Night"); document.writeln("<br>");

}

function lastvisit() {

var days = 730; // days until cookie expires = 2 years.
var lastvisit=new Object();
var firstvisitmsg="This is your first visit to this page. Welcome!"; 
lastvisit.subsequentvisitmsg="Welcome back visitor! Your last visit was on <strong>[displaydate]</strong>";
lastvisit.getCookie=function(Name) { 
var re=new RegExp(Name+"=[^;]+", "i"); 
if (document.cookie.match(re)) 
return document.cookie.match(re)[0].split("=")[1];
return'';
}
lastvisit.setCookie=function(name, value, days) { 
var expireDate = new Date();
var expstring=expireDate.setDate(expireDate.getDate()+parseInt(days));
document.cookie = name+"="+value+"; expires="+expireDate.toGMTString()+"; path=/";
}
lastvisit.showmessage = function() {
var wh = new Date();
if (lastvisit.getCookie("visitc") == "") { 
lastvisit.setCookie("visitc", wh, days); 
document.write(firstvisitmsg);
}
else {
var lv = lastvisit.getCookie("visitc");
var lvp = Date.parse(lv);
var now = new Date();
now.setTime(lvp);
var day = new Array("Sun", "Mon", "Tues", "Wed", "Thur", "Fri", "Sat");
var month = new Array ("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");
var dd = now.getDate();
var dy = now.getDay();
dy = day[dy];
var mn = now.getMonth();
mn = month[mn];
yy = now.getFullYear();
var hh = now.getHours();
var ampm = "AM";
if (hh >= 12) {ampm = "PM"}
if (hh >12){hh = hh - 12};
if (hh == 0) {hh = 12}
if (hh < 10) {hh = "0" + hh};
var mins = now.getMinutes();
if (mins < 10) {mins = "0"+ mins}
var secs = now.getSeconds();
if (secs < 10) {secs = "0" + secs}
var dispDate = dy + ", " + mn + " " + dd + ", " + yy + " " + hh + ":" + mins + ":" + secs + " " + ampm
document.write(lastvisit.subsequentvisitmsg.replace("\[displaydate\]", dispDate))
}
lastvisit.setCookie("visitc", wh, days);
}
lastvisit.showmessage();

}

function visitorip() {

document.write('<iframe src="http://webhq.net46.net/ip.php" marginheight="0" marginwidth="0" frameborder="0" scrolling="no" width:="100px" height="17px"></iframe>')

}

function today() {

var stime = new Date()
document.write(''+stime.toString()+'')

}

function resolution() {

document.write(''+screen.width+' x '+screen.height+'')

}

function browsertest () {

document.write("Congratulations, your browser has passed the JavaScript test!!!")

}

function browsertype() {

if (document.all)
var version=/MSIE \d+.\d+/
if (!document.all)
document.write(""+navigator.appName+" "+navigator.userAgent)
else
document.write(""+navigator.appName+" "+navigator.appVersion.match(version))

}